<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.longtop.com/intelliweb" prefix="e"%>
<%@ page isELIgnored="false"%>
<html>
	<head>
		<title>员工考核方案列表-SJH</title>
	</head>
<e:View id="eView" designProperty="width: 1024; height: 768">
	<script type="text/javascript">SkinUtil.getSkin();</script>
	<script type="text/javascript">SkinUtil.getModuleSkin();</script>	
  
	<div id="Invisual Controls" style="min-height: 40px;">	  
	<!-- 考核方案  -->
		<e:Dataset id="Dataset_project" pageSize="10" loadDataCommand="Command_load">
			<e:Field name="projectId" dataType="string" label="考核方案ID" maxLength="32" visible="false"/>
			<e:Field name="projectName" dataType="string" label="考核方案名称" maxLength="100" />
			<e:Field name="systemId" dataType="string" label="指标体系" maxLength="32" dropDown="DataDropDown_indexSysName"/>
			<e:Field name="cycleId" dataType="string" label="考核周期ID" maxLength="32" visible="false"/>
			<e:Field name="segmentType" dataType="string" label="分段类型" maxLength="32" dropDown="ListDropDown__PROJECT_CYCLE"/>
			<e:Field name="startDate" dataType="date" label="开始日期" maxLength="7" />
			<e:Field name="endDate" dataType="date" label="结束日期" maxLength="7" />
			<e:Field name="projectDesc" dataType="string" label="方案说明" maxLength="200" visible="false"/>
			<e:Field name="remark" dataType="string" label="备注" maxLength="400" visible="false"/>
			<e:Field name="cycleName" dataType="string" label="考核周期名称" />
			 <e:Field name="createUserId" dataType="string" label="创建人ID" maxLength="32" visible="false"/>
			 <e:Field name="createUserName" dataType="string" label="创建人名称" maxLength="100" readOnly="true"/>
			 <e:Field name="createOrgId" dataType="string" label="创建机构ID" maxLength="32" visible="false"/>
			 <e:Field name="createOrgName" dataType="string" label="创建机构名称" maxLength="100"  readOnly="true"/>
			 <e:Field name="orgLevelCode" dataType="string" label="机构级次" maxLength="100" readOnly="true" visible="false"/>
			 <e:Field name="createTime" dataType="timestamp" label="创建时间" maxLength="26" readOnly="true"/>
			 <e:Field name="updateUserId" dataType="string" label="修改人ID" maxLength="32" visible="false"/>
			 <e:Field name="updateUserName" dataType="string" label="修改人名称" maxLength="100" />
			 <e:Field name="updateTime" dataType="timestamp" label="修改时间" maxLength="26" visible="false"/>			
		</e:Dataset>  

	<!-- 所有指标体系ID-名称 -->
		<e:Dataset id="Dataset_indexSys" pageSize="-1">
			<e:Field name="systemId" dataType="string"/>
			<e:Field name="systemName" dataType="string"/>
		</e:Dataset>
		<e:DataDropDown id="DataDropDown_indexSysName" dataset="Dataset_indexSys"
			visibleFields="systemName" codeField="systemId" textField="systemName" showColumnHeader="false" fixed="true">
		</e:DataDropDown>
		
	<!-- 分段类型 -->
		<e:ListDropDown id="ListDropDown__PROJECT_CYCLE" fixed="true" autoDropDown="false">
		</e:ListDropDown>

		<e:Command id="Command_query" action="com.longtop.perform.khyg.web.ProjectListAction" method="queryProject" submitForm="true" showHintInfoOnSuccess="false" >
			<e:DatasetInfo name="info1" dataset="Dataset_project" submitType="none" alwayRefreshClient="true" />
		</e:Command>
		<e:Command id="Command_delete" action="com.longtop.perform.khyg.web.ProjectListAction" method="deleteProject"  submitForm="none" submitFormScope="all" showHintInfoOnSuccess="true">
			<e:Parameter name="projectId" dataType="string"/>
			<e:Parameter name="segCode" dataType="string"/>
		</e:Command>
		<e:Command id="Command_copy" action="com.longtop.perform.khyg.web.ProjectListAction" method="copyProject" showHintInfoOnSuccess="false">
			<e:Parameter name="projectId" dataType="string"/>
			<e:Parameter name="segCode" dataType="string"/>
		</e:Command>
		<e:Command id="Command_load" action="com.longtop.perform.khyg.web.ProjectListAction" method="loadProject" showHintInfoOnSuccess="false">
			<e:DatasetInfo name="info1" dataset="Dataset_project" submitType="none" alwayRefreshClient="true"></e:DatasetInfo>
		</e:Command>
	</div>

<body>
<e:Page id="ePage" action="com.longtop.perform.khyg.web.ProjectListAction" style="min-height: 80px; width: 100%; height: 100%;" 
	onAfterLoadPage="ePage_onAfterLoadPage()" >
   <table style="width: 100%; height: 100%;" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
       <td valign="top" width="100%">
			<table style="text-align: left; width: 100%;" border="0" cellpadding="3" cellspacing="3" >
					<tr>
						<td>
							<e:GroupBox id="GroupBox1" caption="查询条件" style="height: 100%; width:100%;">
								<table style="text-align: left; width: 100%;" border="0" cellpadding="3" cellspacing="3" width="100%" align="center">
									<tr>
										<td align="right" nowrap="nowrap"><e:Label id="Label_projectName" caption="方案名称"/></td>
										<td align="left"> 
											<e:Text id="Text_projectName" style="width:100px"/>
                						</td>									
										<td align="right" nowrap="nowrap"><e:Label id="Label_systemId" caption="指标体系"/></td>
										<td align="left">
											<e:Text id="Text_systemId" dropDown="DataDropDown_indexSysName" style="width:150px"/>
										</td>
										<td align="right" nowrap="nowrap"><e:Label id="Label_cycleUnit" caption="考核周期"/></td>
										<td align="left">
											<e:Text id="Text_cycleUnit" style="width:100px" dropDown="ListDropDown__PROJECT_CYCLE"/>
										</td>
										<td align="left" width="99%">
											<e:Button id="Button_query" caption="查询" style="height: 22px; width: 70px" icon="/images/query.gif" command="Command_query"/>&nbsp;&nbsp;									
										</td>
									</tr>
								</table>
							</e:GroupBox>
						</td>
					</tr>
					<tr>
						<td>
							<table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td height="27px" width="1%">
										<e:RecordNavigator id="RecordNavigator_project" dataset="Dataset_project" showNavigatorButton="false">
	                						<e:RecordButton id="RecordButton_add" label="新增" onClick="RecordButton_add_onClick()" icon="/images/add.gif"></e:RecordButton>
	                						<e:RecordButton id="RecordButton_edit" label="修改" onClick="RecordButton_edit_onClick()" icon="/images/edit.gif"></e:RecordButton>
	              							<e:RecordButton id="RecordButton_delete" label="删除" onClick="RecordButton_delete_onClick()" icon="/images/delete.gif"></e:RecordButton>
	              							<e:RecordButton id="RecordButton_view" label="查看" onClick="RecordButton_view_onClick()"  icon="/images/edit_win.gif" visible="false"></e:RecordButton>
											<e:RecordButton id="RecordButton_copy" label="复制" onClick="RecordButton_copy_onClick()" icon="/images/edit_win.gif"></e:RecordButton>
										</e:RecordNavigator>
									</td>
									<td align="left" width="99%"><e:PageNavigator id="PageNavigator" dataset="Dataset_project" showRecordNum="true"></e:PageNavigator></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<e:Grid id="Grid_project" style="width: 100%; height: 100%;" showIndex="true" dataset="Dataset_project" onClick="Grid_project_onClick()" readOnly="true" >
							</e:Grid>
						</td>
					</tr>			
				</table>
		</td>
      </td>
    </tr>
  </table>
</e:Page>
</body>

<script language="Javascript">
	//init
	function ePage_onAfterLoadPage(){
	    
	}
	//添加方案：
	RecordButton_add_onClick = function(){
		var url='/jsp/perform/khyg/project/projectManage.jsp?task=add';
	    parent.TabUtil.openTab('add','新增方案',url, true);
	}
	//修改方案：
	RecordButton_edit_onClick = function(){
		var dataset = $J('Dataset_project');
	  	var projectId = dataset.getValue('projectId');
	  	if (projectId == null || projectId == ""){
	        MsgBox.showInfoMsg("请选中需要修改的考核方案");
	        return;
	    }
		var url='/jsp/perform/khyg/project/projectManage.jsp?projectId=' + projectId + '&task=update';
	    parent.TabUtil.openTab('edit','修改方案-'+dataset.getValue('projectName'),url, true);
	}
</script>

</e:View>
</html>